#!/bin/bash


#
# Convert an image cropping it to a square
#
# ----------
# -- Args --
# ----------
# > width of the converted image

let "double=$1*2"

`dirname $0`/convertClear-transparency | \
convert -strip -depth 8 -resize x$double -resize "($double)x<" -resize 50% -gravity center -crop $1x$1+0+0 +repage - "${2:-png}":-
